combit List & Label 30 - .NET Help
combit.Reporting.DataProviders Namespace / SqlConnectionDataProvider Class / SqlConnectionDataProvider Constructor / SqlConnectionDataProvider Constructor(SqlConnection,ReadOnlyCollection<String>)
The connection to use.
The list of allowed table schemas.
Example


SqlConnectionDataProvider Constructor(SqlConnection,ReadOnlyCollection<String>)
Initializes the data provider to access all elements available from the connection that belong to the passed schemas.
Syntax
'Declaration
 
Public Function New( _
   ByVal connection As SqlConnection, _
   ByVal tableSchemas As ReadOnlyCollection(Of String) _
)
 

Parameters

connection
The connection to use.
tableSchemas
The list of allowed table schemas.
Example
SqlConnection conn = new SqlConnection(Properties.Settings.Default.ConnectionString); 
List<string> schemas = new List<string>();
schemas.Add("Sales");
schemas.Add("HumanResources");
SqlConnectionDataProvider provider = new SqlConnectionDataProvider(conn, schemas.AsReadOnly());
provider.PrefixTableNameWithSchema = true;
LL.DataSource = provider;
LL.Design();
Dim conn As New SqlConnection(Properties.Settings.[Default].ConnectionString)
Dim schemas As New List(Of String)()
schemas.Add("Sales")
schemas.Add("HumanResources")
Dim provider As New SqlConnectionDataProvider(conn, schemas.AsReadOnly())
provider.PrefixTableNameWithSchema = True
LL.DataSource = provider
LL.Design()
Requirements

See Also